case inside laravel query

30

case inside laravel query -

DB::table('ref')->select(['id','name',DB::raw('(case when (id > 17) then "yes" else "no" end) as present')])->get();

Comments

Submit
0 Comments